<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <title>任务延期日报</title>
    <style>
        html, body {
            margin: 0px;
            padding: 0px;
        }
        body{
            padding: 5px;
        }
        h2{
            text-align: center;
        }

        table {
            width: 100%;
            border-top:3px solid #0088CC;
        }
        .table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{
            background-color:#7FD0FA;
        }

        table td {
            background: #d0ecfa;
            padding:0px 6px;
            line-height: 30px;
            text-align: center;
        }
        table thead th{
            line-height: 40px;
            background: #fbfbfb
        }
        .table-striped>tbody>tr td.sum_td{
            background: #b0e6fa;
            color: red;
            font-weight: bold;
        }
        td.text-left{
            text-align: left;

        }
    </style>
</head>
<body>
<div class='main'>
    <h2><?php echo date("Y/m/d"); ?> - 任务延期日报</h2>
    <table class='table table-condensed table-striped table-bordered tablesorter table-fixed active-disabled' id='taskAssign'>
        <thead>
        <tr class='colhead'>
            <th><?php echo $lang->report->user; ?></th>
            <th><?php echo $lang->report->project; ?></th>
            <th><?php echo $lang->report->task; ?></th>
            <th><?php echo $lang->report->total; ?></th>
        </tr>
        </thead>
        <tbody>
        <?php foreach ($assigns as $account => $assign): ?>
            <?php if (!array_key_exists($account, $users)) continue; ?>
            <tr class="a-center">
                <td rowspan="<?php echo count($assign['task']); ?>"><?php echo $users[$account]; ?></td>
                <?php $id = 1; ?>
                <?php foreach ($assign['task'] as $product => $count): ?>
                    <?php if ($id != 1) echo '<tr class="a-center">'; ?>
                    <td class="text-left"><?php echo $product; ?></td>
                    <td><?php echo $count['count']; ?></td>
                    <?php if ($id == 1): ?>
                        <td rowspan="<?php echo count($assign['task']); ?>" class="sum_td">
                            <?php echo $assign['total']['count']; ?>
                        </td>
                    <?php endif; ?>
                    <?php if ($id != 1) echo '</tr>';
                    $id++; ?>
                <?php endforeach; ?>
            </tr>
        <?php endforeach; ?>
        </tbody>
    </table>
</div>
</body>
</html>
